1. Field of the Invention
The present invention relates to a signal coding apparatus, a signal coding method, a signal recording medium, and a signal transmission methods with high-efficiency coding of a digital signal at a transmission side and in particular, to a signal coding apparatus, a signal coding method, a signal recording medium, and a signal transmission method for coding a moving picture signal with a variable bit rate control.
2. Description of the Prior Art
As a digital video signal has an extremely great data amount, when recording it for a long time on a recording medium having a small storage capacity, it is indispensable to provide means for coding the video signal with a high efficiency. In order to answer such a request, there have been proposed high-efficiency coding methods utilizing a video signal correlation. One of the methods is the MPEG. This MPEG (Moving Picture Image Coding Experts Group) has been proposed as a standard method after discussion in the ISO-IEC/JTC1/SC2/WG11. The MPEG is a hybrid method using a motion compensative coding in combination with the discrete cosine transform (DCT). In this MPEG method, firstly, a video signal difference between frames is determined to remove a redundancy in the temporal axis and then the discrete cosine transform is used to remove a redundancy in the spatial axis thus enabling to encode a video signal with a high efficiency.
In general, a video signal is not stationary but a picture information amount changes as the time lapses. For this, when a variable bit rate coding is used, a higher quality of picture can be obtained compared to a constant bit rate coding if an identical code amount is involved.
For example, a video signal recorded on a so-called DVD-video is normally coded by a variable bit rate coding of two-path type. This two-path method is, for example, disclosed in the Specification and the drawings of Japanese Patent Application 7-3313348 filed by the applicant of the present invention.
Here, FIG. 1 is a block diagram showing a configuration example of a moving picture coding apparatus using a two-path type variable bit rate coding method. FIG. 2 is a flowchart showing a two-path type variable bit rate coding procedure. With reference to this flowchart, explanation will be given on the operation of the block diagram of FIG. 1.
Firstly, in step 301 of FIG. 2, a moving picture signal from a terminal 200 is supplied to a coding difficulty calculator 201 which calculates a coding difficulty of an input image per unit time. Here, the calculation of the coding difficulty is carried out by a DCT coefficient is quantized with a fixed quantization alone in an MPEG method coding apparatus so as to calculate a generated code amount per a unit time. The aforementioned unit time is, for example, in the order of 0.5 seconds. The coding difficulty xe2x80x98dxe2x80x99 calculated is supplied to an allocation bit amount calculator 202.
Next, in step 302, after completion of the calculation of the coding difficulty up to the last input moving picture image signal, the allocation bit amount calculator 202 calculates an allocation bit amount for the input image per unit time according to the entire coding difficulty and the coding bit amount which can be used. For example, the allocation (target) bit amount per unit is calculated by distributing the total amount of the usable coding bits according to the coding difficulty for each unit time.
It should be noted that a delay element 203 is used to delay input of the input moving picture image signal to a moving picture image coding apparatus 204 until the processing of the coding difficulty calculator 201 and the allocation bit amount calculator 202 is complete for the entire time length of the input picture image.
Next, in step 303, the moving picture coding apparatus 204 encodes the input moving picture image per unit time into the allocation amount calculated in step 302.
The processing of step 301 and step 302 constitutes a first path processing in which the coding difficulty and the allocation bit amount are calculated. The processing of step 303 constitutes a second path processing which carries out the actual moving picture image coding. In this two-path method, there is a merit that it is possible to effectively use a usable coding bit amount, but there is also a defect that the processing requires about twice time of the time length of the moving picture image sequence, and is not appropriate for a real-time processing.
In order to reduce this processing time, a one-path type variable bit rate coding method is disclosed in the Specification and drawings of Japanese Patent Application 7-311418 filed by the applicant of the present invention.
A moving picture image coding apparatus employing the one-path type variable bit rate coding method has an identical configuration as that of the block diagram shown in FIG. 1. However, the control method of the allocation bit amount calculator 202 and the delay element 203 is different in the one-path type from the two-path type. FIG. 3 is a flowchart showing the one-path type variable bit rate coding processing. With reference to this flowchart, explanation will be given on the operation of the block diagram of FIG. 1.
In step 4-1 of FIG. 3, a moving picture image signal is supplied to the coding difficulty calculator 201 in FIG. 1, so as to calculate a coding difficulty of the input image per unit time. The aforementioned unit time is, for example, in the order of 0.5 seconds.
Next, in step 402, an encoding difficulty xe2x80x98dxe2x80x99 is related beforehand to an allocation bit amount xe2x80x98bxe2x80x99 per unit time when carrying out a variable bit rate coding of a reference moving picture image sequence with a predetermined average bit rate. Here, the total of the allocation bit amount per unit time for the reference moving picture image sequence is set to a value equal to or below a storage capacity of a target recording medium. This relationship between the coding difficulty xe2x80x98dxe2x80x99 and the allocation bit amount xe2x80x98bxe2x80x99 is shown in FIG. 4.
In FIG. 4, the horizontal axis represents an appearance probability h(d) of a coding difficulty xe2x80x98dxe2x80x99 with the reference moving picture image sequence. An allocation bit amount for an arbitrary coding difficulty is calculated according to the function b(d). This relationship can be obtained empirically by coding a large number of moving picture image sequences (for example, a movie) with a predetermined average bit rate and evaluating the obtained picture quality. Thus, this relationship is a general one which can be applied to most of the sequences in this world. According to this relationship of FIG. 4, an allocation bit amount xe2x80x98bxe2x80x99 is given for a coding difficulty xe2x80x98dxe2x80x99 per unit time of the input image from the terminal 200.
In this one-path type, the delay element 203 is provided so as to delay the input of an input image signal to the moving picture coding apparatus 204 by the unit time until the processing in the coding difficulty calculator 201 and in the allocation bit amount calculator 202 is complete for the input image of the unit time length.
Next, in step 403, the moving picture coding apparatus 204 encodes the input moving picture image per unit time into the allocation bit amount supplied, in accordance with this, from the allocation bit amount calculator 202.
In such a one-path method, according to the input of the image signal, it is possible to carry out a variable bit rate coding with an optimal allocation bit amount according to the coding difficulty almost at real time.
Although the relationship of FIG. 4 can be applied to almost all the moving picture sequence, there are also some special sequences which cannot be treated by this relationship. There is a case when the total bit amount generated in the moving picture coding apparatus 204 exceeds a usable total bit amount, i.e., the moving picture sequence cannot be contained in the target recording medium.
In order to encode a predetermined time length of a moving picture sequence with a variable bit rate at a real time so as to be recorded in a recording medium of a predetermined storage capacity, it is impossible to use the two-path method. Moreover, although the one-path method can encode almost all the moving picture sequences at a real time with a variable bit rate so that a predetermined time length of a sequence is contained in a recording medium of a predetermined storage capacity, there is also a special sequence in which the total coding bit amount exceeds a usable total bit amount, i.e., a predetermined time length of sequence may not be contained in the recording medium.
It is therefore an object of the present invention to provide a moving picture encoding method, a moving picture encoding apparatus, and a coded signal recording medium containing a data recorded by the coding apparatus which guarantee to encode a predetermined time length of moving picture sequence at real time with a variable bit rate so that the total coded bits generated can be contained in a recording medium having a predetermined storage capacity.
In order to achieve the aforementioned object, according to the present invention, an allocation data (e.g., bit) amount is interrelated with a coding difficulty for each unit time standardized in advance using an ordinary input signal of the type to which an input signal belongs, so as to determine a coding difficulty of the input signal for each unit time. For the coding difficulty of the input signal for each time unit, a reference value of the interrelated allocation data amount is determined for said each unit time. The reference value of the allocation data amount is modified into an actual allocation data amount. According this actual allocation data amount, the input signal is coded for said each unit time, so as to create a coded data. Thus, it is possible to carry out coding with an optimal allocation data amount according to a complexity of an input signal at real time.
The aforementioned modification of the allocation data amount into an actual allocation data amount is carried out by controlling the actual allocation data amount so that a total of a generated bit amount generated when a time length of signal which can be recorded on a recording medium is equal to or below a bit amount available in the recording medium for signal recording.
More specifically, in case of coding an input signal for each unit time with a constant allocation bit amount b av, a total B av of allocation bit amounts up to now is compared to a total B gen of actually generated coding bit amount up to now. If a value (B avxe2x88x92B gen) is positive, it is allowed to assign an allocation bit amount equal to or above b av, so as to guarantee the aforementioned. Here, the b av is given by the following equation.
That is, b av=T GOPxc3x97BV/T SEQ, wherein BV is a bit amount available in a signal recording medium for a moving picture image recording; T SEQ is a moving picture image sequence which can be recorded on the signal recording medium; and T GOP is a unit time length.
According to an information used when modifying the aforementioned allocation data amount reference value into an actual allocation data amount, the input signal is subjected to a pre-filter processing and the processed signal is coded, thus enabling the signal coding deterioration to be made less remarkable. More specifically, when suppressing the actual allocation data amount below the allocation data amount reference value, an input image is subjected to a low-pass filter processing, thus enabling the coding deterioration of the image to be made less remarkable.
When coding a signal and recording the coded signal onto a recording medium in several times, the value (B avxe2x88x92B gen) or a value equivalent to the value is recorded on the recording medium, so that when a signal is recorded in an empty area of the recording medium next time, prior to signal recording, the value (B avxe2x88x92B gen) or the value equivalent to the value is read out from the recording medium, according to which value an allocation bit amount of an input signal is calculated for each unit time. This enables to effectively use the storage capacity of the recording medium.
Moreover, for the case that the input signal is a moving picture image signal, the coding difficulty is determined according to an image characteristic information of the input image for each predetermined period of time and coding is carried out with an allocation data amount reflecting human visual characteristic based on the image characteristic information.